package com.biscuit.page.basicservice.utils;

import java.util.Objects;

/**
 * @author biscuit
 * @createTime 2024/6/17 8:30
 */
public class BaseVerifyUtil {

    /**
     * 校验数据的 is_deleted 逻辑删除状态
     *
     * @return true 未删除，false 已删除
     */
    public static boolean verifyDeletedValid(Integer isDeleted) {
        return isDeleted != null && isDeleted == 0;
    }

    /**
     * 全量校验数值是否合法（非空、大于0）
     */
    public static boolean verifyNumberFullValid(Number number) {
        return Objects.nonNull(number) && number.doubleValue() > 0;
    }

}
